/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.deployment.editpart;

import org.eclipse.draw2d.IFigure;

import com.cea.papyrus.core.editor.ModelManager;
import com.cea.papyrus.diagram.deployment.figure.ArtifactISFigure;
import com.cea.papyrus.diagraminterchange2.di2.GraphNode;

/**
 * 
 */
public class DeploymentSpecificationISEditPart extends ArtifactISEditPart{

	/**
	 * 
	 * 
	 * @param modelManager 
	 * @param graphNode 
	 */
	public DeploymentSpecificationISEditPart(GraphNode graphNode, ModelManager modelManager) {
		super(graphNode, modelManager);
	}

	/* (non-Javadoc)
	 * @see com.cea.papyrus.common.editpart.GraphNodeWithSemanticEditPart#createFigure()
	 */
	/**
	 * 
	 * 
	 * @return 
	 */
	@Override
	protected IFigure createFigure() {
		// Force initialization of the manager when figure has changed
		manager = null;
		// Try to get figure from ContainerWithSemanticEditPart
		IFigure fig = super.createFigure();
		if (fig instanceof ArtifactISFigure) {
			return new ArtifactISFigure("deploymentSpecification");
		}
		// Else
		return fig;				
	}

}
